package top.sehnsucht.service.impl;

import top.sehnsucht.dao.PhotoDao;
import top.sehnsucht.service.PhotoService;
import top.sehnsucht.vo.Photo;

import java.util.ArrayList;
import java.util.Map;

/**
 * @Description: 图片业务实现类
 * @Author: Cai
 * @CreateTime: 2021/11/5
 */
@Deprecated
public class PhotoServiceImpl implements PhotoService {
    private PhotoDao photoDao;

    public PhotoServiceImpl(PhotoDao photoDao) {
        this.photoDao = photoDao;
    }


    @Override
    public ArrayList<Map<String, String>> getAllPhotos() {
        return photoDao.getAllPhotos();
    }

    @Override
    public void addPhoto(String name, String photourl) {
        photoDao.addPhoto(name, photourl);
    }

    @Override
    public Photo selectPhotoById(Integer id) {
        return photoDao.getPhotoById(id);
    }
}
